home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / Generic LaserWriter / ChooserSupport.r < prev    next >
Encoding:
Text File  |  1996-06-15  |  3.6 KB  |  153 lines  |  [TEXT/MPS ]

  1. /*
  2.     ChooserSupport.r - other resources needed in order for driver to work
  3.     with the Chooser.
  4.     
  5.     6/14/96 - cn  - Updated to support Universal Interfaces 2.1.
  6.     3/22/94 - dmh - Updated for the b4 seed.
  7.    12/18/93 - dmh - Updated for the b3 seed.
  8.     9/13/93 - dmh - Updated for the b2 seed.
  9.     
  10.     Copyright © 1992-1994 Apple Computer, Inc.
  11.     All rights reserved.
  12. */
  13.  
  14. #include "Types.r"
  15. #include "SysTypes.r"
  16. #include "GXPrintingResTypes.r"
  17.  
  18. //--------------------------------------------------------------------------------------------
  19. // THINGS TO CONTROL THE DEFAULT CHOOSING MECHANSIM
  20. //--------------------------------------------------------------------------------------------
  21.  
  22. // what type of communication does this device use (this is the default, as the actual
  23. // value can be found in the desktop printer).
  24. resource 'look' (-4096, sysheap, purgeable) {
  25.     1,                // use the first in our list by default
  26.     
  27.     {
  28.     "AppleTalk",    -4096,        isAppleTalk,                "LaserWriter";
  29.     "Servers",        -4095,        isAppleTalk+isPrinterShare,    "LaserWriterIS";
  30.     "Serial",        -4094,        iconCells,                    "Modem Port";
  31.     };
  32. };
  33.  
  34.  
  35. resource 'comm' (-4096, sysheap, purgeable) {
  36.     PAP
  37.         {
  38.         8,
  39.         "",
  40.         0, 0, 0, 0
  41.         };
  42. };
  43.  
  44. resource 'comm' (-4095, sysheap, purgeable) {
  45.     PrinterShare
  46.         {
  47.         "",
  48.         0
  49.         };
  50. };
  51.  
  52. resource 'comm' (-4094, sysheap, purgeable) {
  53.     Serial
  54.         {
  55.         baud57600,        /* Output baud rate */
  56.         noParity,        /* Output parity */
  57.         oneStop,        /* Output stop bits */
  58.         data8,            /* Output data size */
  59.         0x00010000,        /* Output handshaking */
  60.         0x00000000,
  61.         baud57600,        /* Input baud rate */
  62.         noParity,        /* Input parity */
  63.         oneStop,        /* Input stop bits */
  64.         data8,            /* Input data bits */
  65.         0,                /* Input handshaking */
  66.         0,
  67.         1024,            /* Input buffer size */
  68.         ".AIn",            /* Input driver name */
  69.         ".AOut"            /* Output driver name */
  70.         };
  71. };
  72.  
  73.  
  74.  
  75. //--------------------------------------------------------------------------------------------
  76. // STANDARD CHOOSER PACK STUFF
  77. //--------------------------------------------------------------------------------------------
  78.  
  79. // NBP Lookup type (maxed out so resource file won't need updating)
  80. resource 'STR ' (-4096, sysheap, purgeable)
  81. {
  82.     "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  83. };
  84.  
  85. // NBP timeout value
  86. type 'GNRL'
  87. {
  88.     byte;    // timeout
  89.     byte;    // retries
  90. };
  91.  
  92. resource 'GNRL' (-4096, sysheap, purgeable)
  93. {
  94.     11,
  95.     5
  96. };
  97.  
  98. // title string (we put the pop-up control here, so we don't want a title)
  99. resource 'STR ' (-4091, sysheap, purgeable)
  100. {
  101.     "";
  102. };
  103.  
  104. // "left" button title
  105. resource 'STR ' (-4093, sysheap, purgeable)
  106. {
  107.     "Create";
  108. };
  109.  
  110. // rectangle list
  111. resource 'nrct' (-4096, sysheap, purgeable) {
  112.     {
  113.     {112, 251, 132, 311};            // left button
  114.     {0,0,0,0};                        // right button
  115.     {-101, 180, -101+20, 400};        // on button (location of device list - popup is placed here)
  116.     {0,0,0,0};                        // off button
  117.     {0,0,0,0};                        // button label
  118.     };
  119. };
  120.  
  121. // Menu used to select between direct connect, AppleTalk, and Servers
  122. resource 'MENU' (-4096, sysheap, purgeable)
  123. {
  124.     -4096,
  125.     textMenuProc,
  126.     0xFFFFFFFF,    
  127.     enabled,
  128.     "",
  129.     {
  130.     }
  131. };
  132.  
  133. // Pop-up control used to select between direct connect printers and those being shared on the network
  134. resource 'CNTL' (-4096, sysheap, purgeable)
  135. {
  136.     {0, 0, 20, 213},                            // zero based control location
  137.     0,                                            // Title options 0 = Left justified
  138.     visible,                                    // Should we display the control?
  139.     95,                                            // Title Width
  140.     -4096,                                        // 'MENU' to display
  141.     popupMenuCDEFproc+popupFixedWidth,            // CDEF = CDEFID * 16 + varCode
  142.     0,                                             // refCon = ResType to append = None
  143.     "Connect via:"                                // Control title
  144. };
  145.  
  146. resource 'DITL' (-4096, sysheap, purgeable) 
  147. {
  148.     {
  149.         {3, 238, 23, 238 + 213}, 
  150.             Control {enabled, -4096},
  151.     };
  152. };
  153.